/*
 * Project: push-center-service-impl
 * 
 * File Created at 2014-10-10
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.service.core.send.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.greenline.push.core.enums.Channels;

/**
 *  SenderManager
 *  
 * @author weirui.shenwr
 * @date 2014-10-10
 * @version V1.0
 */
public class SenderManager {
    private Map<Channels,ISender> map=new HashMap<Channels, ISender>();
    
    public SenderManager(List<ISender> list) {
        for (ISender iSender : list) {
            map.put(iSender.supportChannel(), iSender);
        }
    }

    public ISender get(Channels channel){
       return map.get(channel);
    }
 
}
